#ifndef WII_GI_C_RESOURCE_H
#define WII_GI_C_RESOURCE_H

#include <string>

namespace wiigi
{
   class c_ResourceMgr;
   class c_Engine;
   
   //
   // c_Resource
   //-----------------
   class c_Resource
   {
   public:
      c_Resource( c_ResourceMgr* ResourceMgr );
      
      virtual ~c_Resource(void);
      
      
      std::string& getGroup( void )
      {
         return m_Group;
      }
      
      std::string& getName( void )
      {
         return m_Name;
      }

      virtual bool setParameter( const std::string& ParameterName, const std::string& ParameterValue );
               
      virtual bool cache( void ) = 0;
      virtual bool purge( void ) = 0;
      
      static c_Resource* createResource( c_ResourceMgr* ResourceMgr, const std::string& ResourceType );

   protected:
      static const std::string d_DefaultGroup;
      static const std::string d_DefaultName;
      
      c_ResourceMgr* m_ResourceMgr;
      c_Engine*      m_Engine;
      
   private:
    c_Resource( const c_Resource& );
    c_Resource& operator=( const c_Resource& );
    
    //Following functions are used during creation from script entries
   void setName( const std::string& Name )
   {
      m_Name = Name;
   }
   
   void setGroup( const std::string& Group )
   {
      m_Group = Group;
   }

   private:
      std::string m_Name;
      std::string m_Group;
         
   };
   
   
};

#endif //WII_GI_C_RESOURCE_H
